using System;
using Beetle;

[AttributeUsage(AttributeTargets.All)]
internal class y : Attribute
{
	[s]
	public static string a = "KntezZn3/HTLy0OE4rsKQJAtd7Q9rU8f";

	[a0]
	public static string b = "baxxfKKgHV9XwOpsrn1uYA==";

	public static bool c = false;

	internal int d;

	public static bool e = false;

	internal av f;

	public byte[] g;

	public int h;

	public int i;

	public int j;

	public int k;

	private ByteArraySegment l;

	public y m;

	public y(string A_0)
	{
	}

	public y(int A_0)
	{
		g = new byte[A_0];
		k = A_0;
		j = A_0;
		l = new ByteArraySegment();
		l.SetInfo(g, 0, A_0);
	}

	public av a()
	{
		if (f == null)
		{
			f = new av();
			f.SetBuffer(g, 0, k);
		}
		f.SetBuffer(0, i);
		return f;
	}

	public int a(int A_0)
	{
		int num = i - h;
		if (num >= A_0)
		{
			return A_0;
		}
		return num;
	}

	public bool c(int A_0)
	{
		return j >= A_0;
	}

	public void b(int A_0)
	{
		if (h == i)
		{
			i += A_0;
		}
		else
		{
			int num = i - h;
			if (num < A_0)
			{
				i += A_0 - num;
			}
		}
		j = k - i;
		h += A_0;
	}

	public ByteArraySegment c()
	{
		l.SetInfo(h, i - h);
		return l;
	}

	public void d(int A_0)
	{
		h += A_0;
	}

	public int a(byte[] A_0, int A_1, int A_2)
	{
		int result;
		if (j >= A_2)
		{
			Buffer.BlockCopy(A_0, A_1, g, h, A_2);
			b(A_2);
			result = A_2;
		}
		else
		{
			Buffer.BlockCopy(A_0, A_1, g, h, j);
			result = j;
			b(j);
		}
		return result;
	}

	public void b()
	{
		h = 0;
		i = 0;
		j = k;
	}
}
